package model;

import java.io.Serializable;

/**
 * Class Storage
@Annot(author="maxim", description = "Class Storage")
*/
public class Storage implements Serializable{
	
	/* (non-Javadoc)
	 * @see java.lang.Object#hashCode()
	 */
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((name == null) ? 0 : name.hashCode());
		result = prime * result + weight;
		result = prime * result + workAreaId;
		result = prime * result + x;
		result = prime * result + y;
		return result;
	}
	/** 
	 * @see java.lang.Object#equals(java.lang.Object)
	 */
	@Override
	public boolean equals(Object obj) {
		if (this == obj) {
			return true;
		}
		if (obj == null) {
			return false;
		}
		if (!(obj instanceof Storage)) {
			return false;
		}
		Storage other = (Storage) obj;
		if (name == null) {
			if (other.name != null) {
				return false;
			}
		} else if (!name.equals(other.name)) {
			return false;
		}
		if (weight != other.weight) {
			return false;
		}
		if (workAreaId != other.workAreaId) {
			return false;
		}
		if (x != other.x) {
			return false;
		}
		if (y != other.y) {
			return false;
		}
		return true;
	}


	private transient int id ;
	private  int workAreaId ;
	private String name;
	private int weight;
	private int x;
	private int y;
	
	/**
	 * CREATE getter for workAreaId
	@Annot(author="maxim", description = "CREATE getter for workAreaId")
	*/
	public int getWorkAreaId() {
		return workAreaId;
	}
	/**
	 * CREATE getter for Id
	@Annot(author="maxim", description = "CREATE getter for Id")
	*/
	public int getId() {
		return id;
	}
	/**
	 * CREATE getter for Name
	@Annot(author="maxim", description = "CREATE getter for Name")
	*/
	public String getName() {
		return name;
	}
	/**
	 * CREATE getter for weight
	@Annot(author="maxim", description = "CREATE getter for weight")
	*/
	public int getWeight() {
		return weight;
	}
	/**
	 * CREATE getter for X
	@Annot(author="maxim", description = "CREATE getter for X")
	*/
	public int getX() {
		return x;
	}
	/**
	 * CREATE getter for Y
	@Annot(author="maxim", description = "CREATE getter for Y")
	*/
	public int getY() {
		return y;
	}
	/**
	 * CREATE setter for Id
	@Annot(author="maxim", description = "CREATE setter for Id")
	*/
	public void setId(int id) {
		this.id = id;
	}
	/**
	 * CREATE setter for workAreaIdd
	@Annot(author="maxim", description = "CREATE setter for workAreaIdd")
	*/
	public void setWorkAreaId(int workAreaId) {
		this.workAreaId = workAreaId;
	}
	/**
	 * CREATE setter for Name
	@Annot(author="maxim", description = "CREATE setter for Name")
	*/
	public void setName(String name) {
		this.name = name;
	}
	/**
	 * CREATE setter for weight
	@Annot(author="maxim", description = "CREATE setter for weight")
	*/
	public void setWeight(int weight) {
		this.weight = weight;
	}
	/**
	 * CREATE setter for X
	@Annot(author="maxim", description = "CREATE setter for X")
	*/
	public void setX(int x) {
		this.x = x;
	}
	/**
	 * CREATE setter for Y
	@Annot(author="maxim", description = "CREATE setter for Y")
	*/
	public void setY(int y) {
		this.y = y;
	}
	
	
	/**
	 * Return values of the class
	@Annot(author="maxim", description = "Return values of the class")
	*/
	@Override
	public String toString() {
		return "Storage [id=" + id + ", workAreaId=" + workAreaId + ", name="
				+ name + ", weight=" + weight + ", x=" + x + ", y=" + y + "]";
	}
}
